package com.ky.gp.app.service;


import com.ky.common.param.UserLogin;

import com.ky.common.param.UserAdd;


import com.ky.common.vo.R;
import com.ky.gp.app.config.OpenFeignConfig;

import com.ky.user.entity.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletRequest;


@FeignClient(value = "gp-user-server", configuration = OpenFeignConfig.class)
public interface UserFeign {
    @RequestMapping("/user/user/findAllFollows")
    public R findAllFollows();

    @RequestMapping("/user/user/logincode")
    R loginCode(@RequestBody UserLogin userLogin);
    @RequestMapping("/user/user/loginpass")
    R loginPass(@RequestBody UserLogin userLogin);


    @RequestMapping("/user/user/register")
    R register(@RequestBody UserAdd userAdd);

    @RequestMapping("/user/user/getUser")
    public R getUser();
    @RequestMapping("/user/user/findByMapFollows")
    R findByMapFollows(@RequestParam("username") String username);
    @RequestMapping("/user/user/logout")
    public R logout();
    @RequestMapping("/user/user/findById")
    public R findById();
    @PostMapping("/user/user/save")
    R saveUser(@RequestBody User user);
    @PostMapping("/user/user/updatePassword")
    R updatePassword(@RequestBody User user);
   /* @RequestMapping("/user/user/selectUser")
    R selectUser(@RequestParam("userId") int userId);*/

    @PostMapping("/user/user/updatePhone")
    R updatePhone(@RequestBody User user);

    @RequestMapping("/user/user/selectUser/{userId}")
    R selectUser(@PathVariable("userId") int userId);
}
